﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using 低频天线阵列相控阵信号发生系统SmartFASK12.Models;

namespace 低频天线阵列相控阵信号发生系统SmartFASK12.View.AdjustDemodulation
{
    public partial class FViewCurve : Form
    {
        public FViewCurve(CalSingalInfo calSingalInfo)
        {
            InitializeComponent();

            Init(calSingalInfo);
        }

        private void Init(CalSingalInfo calSingalInfo)
        {
            List<double> xs = new List<double>();
            int index = 1;
            foreach (int csi in calSingalInfo.res)
            {
                xs.Add(index);
                index++;
            }
            formsPlot1.Plot.AddSignalXY(xs.Take(10000).ToArray(), calSingalInfo.res.Take(10000).ToArray());
            //设置图例的可见性
            formsPlot1.Plot.Legend();
            formsPlot1.Plot.AxisAuto();
            formsPlot1.Refresh();
        }
    }
}
